import requests

header = {
    'Accept':'text/plain, */*; q=0.01',
    'Accept-Encoding': 'gzip, deflate',
    'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
    'Cache-Control': 'no-cache',
    'Connection': 'keep-alive',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36 Edg/100.0.1185.50',
    'X-Requested-With': 'XMLHttpRequest',
}
# modify userName & userPwd
param = {
    "userName":"yourAccount","userPwd":"yourPwdInBrowser","userDynamicPwd":"","userDynamicPwdd":"","serviceTypeHIDE":"","serviceType":"","isSavePwd":"on","userurl":"","userip":"","basip":"","language":"Chinese","usermac":"null","wlannasid":"","wlanssid":"","entrance":"null","loginVerifyCode":"","userDynamicPwddd":"","customPageId":"103","send_dynamic_pwd_type":"0","pwdMode":"0","portalProxyIP":"172.30.1.251","portalProxyPort":"50200","dcPwdNeedEncrypt":"1","assignIpType":"0","appRootUrl":"http://w.uic.edu.cn:8080/portal/","manualUrl":"","manualUrlEncryptKey":""
}

res = requests.post('http://172.30.1.251:8080/portal/pws?t=li&ifEmailAuth=false', params=param, headers=header)
print(res.text)